#Pacotes
library(plotly)
## Warning: package 'plotly' was built under R version 4.3.1
## Carregando pacotes exigidos: ggplot2
##
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
##
## last_plot
## The following object is masked from 'package:stats':
##
## filter
## The following object is masked from 'package:graphics':
##
## layout
library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.1.2 ✔ readr 2.1.4
## ✔ forcats 1.0.0 ✔ stringr 1.5.0
## ✔ lubridate 1.9.2 ✔ tibble 3.2.1
## ✔ purrr 1.0.1 ✔ tidyr 1.3.0
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks plotly::filter(), stats::filter()
## ✖ dplyr::lag() masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(openxlsx)
#Dados
#planilha
dados<- read.xlsx("Parametros teste tempo x calibracao.xlsx", sheet = "PCA")
dados$Tempo<-as.factor(dados$Tempo)
#Graficos
p<-plot_ly(dados, x = ~KeV, y = ~uA, z = ~Zn_R2, color = dados$Tempo, size = ~Zn_R2,
marker = list(symbol= "Circle", sizemode = 'diameter'), sizes = c(5, 25))
z<-p%>% layout(title= "Operational conditions for analysis of Zn in leaf samples via pXRF",
legend = list (title =list(text = "Elapsed time (seconds)")),
scene = list(zaxis = list(title = "Zn (R<sup>2</sup>)"),
yaxis = list(title = "µA")))
z
## No trace type specified:
## Based on info supplied, a 'scatter3d' trace seems appropriate.
## Read more about this trace type -> https://plotly.com/r/reference/#scatter3d
## No scatter3d mode specifed:
## Setting the mode to markers
## Read more about this attribute -> https://plotly.com/r/reference/#scatter-mode
## Warning: `line.width` does not currently support multiple values.
## Warning: `line.width` does not currently support multiple values.
## Warning: `line.width` does not currently support multiple values.
## Warning: `line.width` does not currently support multiple values.
## Warning: `line.width` does not currently support multiple values.
## Warning: `line.width` does not currently support multiple values.